3.2296 \(\int (1+x) (a+b x) \left (1-x+x^2\right ) \, dx\)

Optimal. Leaf size=28 \[ \frac{a x^4}{4}+a x+\frac{b x^5}{5}+\frac{b x^2}{2} \]

[Out]

a*x + (b*x^2)/2 + (a*x^4)/4 + (b*x^5)/5

_______________________________________________________________________________________

Rubi [A]  time = 0.0449807, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.059 \[ \frac{a x^4}{4}+a x+\frac{b x^5}{5}+\frac{b x^2}{2} \]

Antiderivative was successfully verified.

[In]  Int[(1 + x)*(a + b*x)*(1 - x + x^2),x]

[Out]

a*x + (b*x^2)/2 + (a*x^4)/4 + (b*x^5)/5

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{a x^{4}}{4} + \frac{b x^{5}}{5} + b \int x\, dx + \int a\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1+x)*(b*x+a)*(x**2-x+1),x)

[Out]

a*x**4/4 + b*x**5/5 + b*Integral(x, x) + Integral(a, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00223604, size = 28, normalized size = 1. \[ \frac{a x^4}{4}+a x+\frac{b x^5}{5}+\frac{b x^2}{2} \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + x)*(a + b*x)*(1 - x + x^2),x]

[Out]

a*x + (b*x^2)/2 + (a*x^4)/4 + (b*x^5)/5

_______________________________________________________________________________________

Maple [A]  time = 0.001, size = 23, normalized size = 0.8 \[ ax+{\frac{b{x}^{2}}{2}}+{\frac{a{x}^{4}}{4}}+{\frac{b{x}^{5}}{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1+x)*(b*x+a)*(x^2-x+1),x)

[Out]

a*x+1/2*b*x^2+1/4*a*x^4+1/5*b*x^5

_______________________________________________________________________________________

Maxima [A]  time = 0.691403, size = 30, normalized size = 1.07 \[ \frac{1}{5} \, b x^{5} + \frac{1}{4} \, a x^{4} + \frac{1}{2} \, b x^{2} + a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(x^2 - x + 1)*(x + 1),x, algorithm="maxima")

[Out]

1/5*b*x^5 + 1/4*a*x^4 + 1/2*b*x^2 + a*x

_______________________________________________________________________________________

Fricas [A]  time = 0.239475, size = 1, normalized size = 0.04 \[ \frac{1}{5} x^{5} b + \frac{1}{4} x^{4} a + \frac{1}{2} x^{2} b + x a \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(x^2 - x + 1)*(x + 1),x, algorithm="fricas")

[Out]

1/5*x^5*b + 1/4*x^4*a + 1/2*x^2*b + x*a

_______________________________________________________________________________________

Sympy [A]  time = 0.085985, size = 22, normalized size = 0.79 \[ \frac{a x^{4}}{4} + a x + \frac{b x^{5}}{5} + \frac{b x^{2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1+x)*(b*x+a)*(x**2-x+1),x)

[Out]

a*x**4/4 + a*x + b*x**5/5 + b*x**2/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.260113, size = 30, normalized size = 1.07 \[ \frac{1}{5} \, b x^{5} + \frac{1}{4} \, a x^{4} + \frac{1}{2} \, b x^{2} + a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(x^2 - x + 1)*(x + 1),x, algorithm="giac")

[Out]

1/5*b*x^5 + 1/4*a*x^4 + 1/2*b*x^2 + a*x